<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="keywords" content="!{$keywords}" />
		<meta name="description" content="!{$description}" />
		<title>!{$page_title}</title>
		<link rel="stylesheet" type="text/css" href="!{res file='css/base.css'}"></link> 
		<link rel="stylesheet" type="text/css" href="!{res file='os/css/ibox.css'}"></link> 
		<link rel="stylesheet" type="text/css" href="!{res lib='jquery_ui.css'}"></link>
		<link rel="stylesheet" type="text/css" href="!{res file='manager/css/manager.css'}"></link> 
		<script src="!{res file='js/jquery-1.7.1.min.js'}"></script>
	</head>
	<body id="login_body">
		!{if $error}<div class="error">!{$error}</div>!{/if}
		!{if $info}<div class="info">!{$info}</div>!{/if}
		<div id="login_form_div">
			<form id="login_form" method="post" target="_top">
				<h3>用户登录</h3>
				<div class="form_item">
					<strong>用户名：</strong>
					<label><input type="text" name="user_name" class="text_input"/></label>
					<p>请输入管理员名称</p>
				</div>
				<div class="form_item">
					<strong>密码：</strong>
					<label><input type="password" name="password" class="text_input"/></label>
					<p>请输入管理员密码</p>
				</div>
				!{if $captcha_request}
				<div class="form_item captcha_item" id="captcha_item">
					<strong>验证码：</strong>
					<label><input type="text" name="captcha" class="text_input"/><img src="/index.php?act=captcha"/></label>
				</div>
				!{/if}
				<div class="form_item form_btn_item">
					<input id="submit_btn" type="submit" class="button ui-button ui-widget ui-state-default ui-corner-all" value="登录"/>
				</div>
			</form>
		</div>	
		<script src="!{res file='js/jquery_plus/jquery.form.js'}"></script>
		<script src="!{res file='js/common.js'}"></script>
		<script>
			$(function(){
				$('#login_form').ajax_form({
					submit_btn : '#submit_btn',
					is_alert : false,
					success : function(form,json){
						if(json.result){
							//跳转到首页
							top.window.location.href = '/manager.php';
						}else{
							if(json.error_count>3){
								$("#captcha_item").show();
							}else if(json.error_count>10){
								$("body").html("错误登录次数过多，30分钟内禁止登录！");
							}
						}
					}
				});
			});
		</script>
	</body>
</html>